package com.scoressystem.mapper;

import com.scoressystem.pojo.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface TeacherMapper {

    List<Teacher> findAll();

    Teacher findById(Integer id);

    int insert(Teacher teacher);

    int update(Teacher teacher);

    int delete(Integer id);

    List<Teacher> findByName(String name);

    /**
     * MyBatis查询参数Map集合
     * @param map
     * @return
     */
    List<Teacher> findByAge(Map<String, Object> map);

    /**
     * MyBatis分页查询
     */
    List<Teacher> findByPage(Map<String, Object> map);

    /**
     * MyBatis返回值map集合
     */
    Map<String, Object> getTeacherInfo();

    Teacher getTeacherByName(@Param("name") String name, @Param("password") String password);

    int updatePwd(@Param("name") String name, @Param("newPwd") String newPwd);
}
